<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class SqlCompatibleBehavior</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class SqlCompatibleBehavior</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">SqlCompatibleBehavior class</p>
	<ul class="tags">
				<li><span class="field">uses:</span> ModelBehavior</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_behaviors---sql_compatible.php.html">/behaviors/sql_compatible.php</a> (line <span class="field"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a31">31</a></span>)
		</p>
		
				
		<pre>ModelBehavior
   |
   --SqlCompatibleBehavior</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																								<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$name" title="details" class="var-name">$name</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$settings" title="details" class="var-name">$settings</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_defaultSettings" title="details" class="var-name">$_defaultSettings</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#afterFind" title="details" class="method-name">afterFind</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$results</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$primary</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#beforeFind" title="details" class="method-name">beforeFind</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#convertDates" title="details" class="method-name">convertDates</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$results</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$results</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setup" title="details" class="method-name">setup</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_translateConditions" title="details" class="method-name">_translateConditions</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$conditions</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$conditions</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#_translateOperator" title="details" class="method-name">_translateOperator</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$operator</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$name" id="$name"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$name</span>
			 = <span class="var-default"> 'SqlCompatible'</span>			(line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a39">39</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">name property</p>
	<ul class="tags">
				<li><span class="field">var:</span> 'SqlCompatible'</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$settings" id="$settings"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$settings</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a49">49</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Runtime settings</p>
<p class="description"><p>Keyed on model alias</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_defaultSettings" id="$_defaultSettings"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_defaultSettings</span>
			 = <span class="var-default">array(<br />		'convertDates' =&gt; true,<br />		'operators' =&gt; array(<br />			'!=' =&gt; '$ne',<br />			'&gt;' =&gt; '$gt',<br />			'&gt;=' =&gt; '$gte',<br />			'&lt;' =&gt; '$lt',<br />			'&lt;=' =&gt; '$lte',<br />			'IN' =&gt; '$in',<br />			'NOT' =&gt; '$not',<br />			'NOT IN' =&gt; '$nin'<br />		))</span>			(line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a57">57</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">defaultSettings property</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodafterFind" id="afterFind"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">afterFind</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a94">94</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">If requested, convert dates from MongoDate objects to standard date strings</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			afterFind
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$results</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$primary</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$results</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$primary</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodbeforeFind" id="beforeFind"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">beforeFind</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a111">111</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">beforeFind method</p>
<p class="description"><p>If conditions are an array ensure they are mongified</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			beforeFind
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$query</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodconvertDates" id="convertDates"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">convertDates</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a125">125</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert MongoDate objects to strings for the purpose of view simplicity</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			convertDates
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$results</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$results</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$results</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$results</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetup" id="setup"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setup</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a81">81</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">setup method</p>
<p class="description"><p>Allow overriding the operator map</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setup
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$config</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="method_translateConditions" id="_translateConditions"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_translateConditions</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a145">145</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">translateConditions method</p>
<p class="description"><p>Loop on conditions and desqlify them</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_translateConditions
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type"></span>&nbsp;<span class="var-name">&$conditions</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$conditions</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$conditions</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$conditions</span>			</li>
				</ul>
		
			
	</div>
<a name="method_translateOperator" id="_translateOperator"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_translateOperator</span> (line <span class="line-number"><a href="../../__filesource/fsource_mongodb_mongodb-models-behaviors_behaviorssql_compatible.php.html#a264">264</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">translateOperator method</p>
<p class="description"><p>Use the operator map for the model and return what the db really wants to hear</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			_translateOperator
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$operator</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$operator</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 26 Jul 2011 01:09:02 +0900 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>